
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <string.h>
#include <stdio.h>

#include <fonts_manager.h>


static FontOpr *g_ptFontOpr = NULL;




void RegisterFontOpr(FontOpr *ptFontOpr)
{
    ptFontOpr->ptNext = g_ptFontOpr;
    g_ptFontOpr = ptFontOpr;
}





void RegisterAllFontOpr(void)
{
    extern void RegisterFT(void);
    RegisterFT();
    extern void RegisterAscii(void);
    RegisterAscii();
    extern void Registerhzk(void);
    Registerhzk();
}



void ShowAllFontOpr(void)
{
	PFontOpr ptTmp = g_ptFontOpr;
	int i = 0;
	while (ptTmp)
	{
		printf("%02d %s\n", i++, ptTmp->name);
		ptTmp = ptTmp->ptNext;
	}
}



PFontOpr GetFontOprByName(char *name)
{
	PFontOpr ptTmp = g_ptFontOpr;
	while (ptTmp)
	{
		if (strcmp(ptTmp->name, name) == 0)
		{
			return ptTmp;
		}
		ptTmp = ptTmp->ptNext;
	}
	return NULL;
}




